-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: detect Python methods as properties correctly #1111
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1111.centralus.azurestaticapps.net |
src/format_python.js
Outdated
return { key: 'd', title: 'Deprecated' }; | ||
if (member.kind === 'event') | ||
return { key: 'c', title: 'Events' }; | ||
if (member.kind === 'property' || (member.kind === 'method' && !member.async && member.argsArray.length === 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd instead introduce renderSyncNoArgsMethodAsProperty(): boolean
method and put this logic into generator.js
.
75a7bd0
to
83a7ee3
Compare
* srcDir: string, | ||
* outDir: string, | ||
* formatter: GeneratorFormatter, | ||
* renderSyncNoArgsMethodAsProperty?: boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think this is more of a GeneratorFormatter
property rather than generator's parameter, but this way also works.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1111.centralus.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1111.centralus.azurestaticapps.net |
Fixes microsoft/playwright-python#2025